<?php $this->pageTitle = 'Đăng nhập thành viên';?>
<div class="heading">
    <h1><a class = "title-page"><?php echo $this->pageTitle;?></a></h1>
    <div class="controls">

    </div>
</div>
<br/>
<div class="content">
	<div class="user-profile" style="text-align: center;">
		<div class="left-column form" style="width: 300px;margin: auto;">
			<?php if(Yii::app()->user->hasFlash('loginMessage')): ?>
				<div class="success"><?php echo Yii::app()->user->getFlash('loginMessage'); ?></div>
			<?php endif; ?>
			<?php echo CHtml::beginForm(); ?>
				<?php if (!empty($model->errors)) :?>
				<div class="flash-notice">Tài khoản hoặc mật khẩu không đúng!</div>
				<?php endif;?>
				<table>
					<tbody>
						<tr class="row">
							<td><?php echo CHtml::activeLabelEx($model,'username'); ?></td>
							<td><?php echo CHtml::activeTextField($model,'username', array()) ?></td>
						</tr>
						<tr class="row">
							<td><?php echo CHtml::activeLabelEx($model,'password'); ?></td>
							<td><?php echo CHtml::activePasswordField($model,'password', array()) ?></td>
						</tr>
						<tr class="row" align="right">
							<td colspan="2">
								<?php echo CHtml::link(UserModule::t("Lost Password?"),Yii::app()->getModule('user')->recoveryUrl, array('class' => 'a1')); ?>
							</td>
						</tr>
						<tr class="row">
							<td colspan="2">
								<div class="row submit"><?php echo CHtml::submitButton(UserModule::t("Login"), array('class' => 'controls btn')); ?></div>
							</td>
						</tr>
					</tbody>
				</table>

			<?php echo CHtml::endForm(); ?>


			<?php
			$form = new CForm(array(
			    'elements'=>array(
			        'username'=>array(
			            'type'=>'text',
			            'maxlength'=>32,
			        ),
			        'password'=>array(
			            'type'=>'password',
			            'maxlength'=>32,
			        ),
			        'rememberMe'=>array(
			            'type'=>'checkbox',
			        )
			    ),

			    'buttons'=>array(
			        'login'=>array(
			            'type'=>'submit',
			            'label'=>'Login',
			        ),
			    ),
			), $model);
			?>
		</div>
	</div>
</div>